// -----------------------------------------------------------------------------
// Generate By Furion Tools v1.6.0                            
// -----------------------------------------------------------------------------

using Furion.DatabaseAccessor;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using System;
using System.Collections.Generic;

#nullable disable

namespace iemtm.WeChat.Core
{
    public partial class AlarmListHis : IEntity<MasterDbContextLocator>, IEntityTypeBuilder<AlarmListHis, MasterDbContextLocator>
    {

        public string AlarmCode { get; set; }
        public string AlarmType { get; set; }
        public string QueryString { get; set; }
        public string JobNumber { get; set; }
        public string AreaCode { get; set; }
        public string BaseStationCode { get; set; }
        public string BaseStationTTCode { get; set; }
        public string BaseStationName { get; set; }
        public string Operators { get; set; }
        public int? AlarmLevel { get; set; }
        public string AlarmName { get; set; }
        public string AlarmDetail { get; set; }
        public string AlarmDeviceId { get; set; }
        public string AlarmDeviceName { get; set; }
        public string AlarmOccTime { get; set; }
        public string AlarmCleanTime { get; set; }
        public string AlarmTookTime { get; set; }
        public bool? AlarmIsTimeOut { get; set; }
        public string BatteryVoltage { get; set; }
        public bool? IsLowVoltage { get; set; }
        public string LowVoltageTime { get; set; }
        public string ConfirmPersonCode { get; set; }
        public string ConfirmTime { get; set; }
        public string ConfirmReason { get; set; }
        public string AnnounceCode { get; set; }
        public int? AlarmStatus { get; set; }
        public DateTime? CreateTime { get; set; }
        public string CreatePerson { get; set; }
        public string PrjCode { get; set; }
        public int? IsValid { get; set; }
        public int? IsStop { get; set; }
        public DateTime? AnnouceTime { get; set; }
        public string AlarmTTID { get; set; }
    
        public void Configure(EntityTypeBuilder<AlarmListHis> entityBuilder, DbContext dbContext, Type dbContextLocator)
        {
                entityBuilder.HasKey(e => e.AlarmCode)
                    .HasName("PK__AlarmLis__192E94C00EDB7D68");

                entityBuilder.HasIndex(e => new { e.AreaCode, e.PrjCode }, "Select_AlarmListHis");

                entityBuilder.HasIndex(e => new { e.AreaCode, e.PrjCode, e.BaseStationName }, "Serach_AlarmListHis");

                entityBuilder.Property(e => e.AlarmCode).HasMaxLength(100);

                entityBuilder.Property(e => e.AlarmCleanTime).HasMaxLength(100);

                entityBuilder.Property(e => e.AlarmDetail).HasMaxLength(200);

                entityBuilder.Property(e => e.AlarmDeviceId).HasMaxLength(100);

                entityBuilder.Property(e => e.AlarmDeviceName).HasMaxLength(100);

                entityBuilder.Property(e => e.AlarmName).HasMaxLength(200);

                entityBuilder.Property(e => e.AlarmOccTime).HasMaxLength(100);

                entityBuilder.Property(e => e.AlarmTTID).HasMaxLength(100);

                entityBuilder.Property(e => e.AlarmTookTime).HasMaxLength(20);

                entityBuilder.Property(e => e.AlarmType)
                    .HasMaxLength(100)
                    .IsUnicode(false);

                entityBuilder.Property(e => e.AnnouceTime).HasColumnType("datetime");

                entityBuilder.Property(e => e.AnnounceCode)
                    .HasMaxLength(100)
                    .IsUnicode(false);

                entityBuilder.Property(e => e.AreaCode).HasMaxLength(50);

                entityBuilder.Property(e => e.BaseStationCode).HasMaxLength(100);

                entityBuilder.Property(e => e.BaseStationName).HasMaxLength(300);

                entityBuilder.Property(e => e.BaseStationTTCode).HasMaxLength(50);

                entityBuilder.Property(e => e.BatteryVoltage).HasMaxLength(20);

                entityBuilder.Property(e => e.ConfirmPersonCode).HasMaxLength(50);

                entityBuilder.Property(e => e.ConfirmReason).HasMaxLength(200);

                entityBuilder.Property(e => e.ConfirmTime).HasMaxLength(100);

                entityBuilder.Property(e => e.CreatePerson)
                    .HasMaxLength(100)
                    .IsUnicode(false);

                entityBuilder.Property(e => e.CreateTime).HasColumnType("datetime");

                entityBuilder.Property(e => e.JobNumber)
                    .HasMaxLength(100)
                    .IsUnicode(false);

                entityBuilder.Property(e => e.LowVoltageTime).HasMaxLength(100);

                entityBuilder.Property(e => e.Operators).HasMaxLength(50);

                entityBuilder.Property(e => e.PrjCode)
                    .HasMaxLength(100)
                    .IsUnicode(false);

                entityBuilder.Property(e => e.QueryString)
                    .HasMaxLength(100)
                    .IsUnicode(false);
        }

    }
}

